<?php

return array(
    //'配置项'=>'配置值'
    // 'LOAD_EXT_CONFIG' => 'pay_config',
    //自动加载 自己创建的类库
    'AUTOLOAD_NAMESPACE' => array(
        'Lib' => APP_PATH . 'Libs',
    ),
    //URL模式
    'URL_MODEL' => '2',
    'URL_ROUTER_ON' => true, //开启路由
    //URL配置
    'URL_ROUTE_RULES' => array(
            '/^Goods\/(\d+)$/' => 'Goods/index?id=:1',
            '/^Supplier\/(\d+)$/' => 'Supplier/index?suppId=:1',
            '/^Virtual\/(\d+)$/' => 'Virtual/index?id=:1',
            '/^Article\/(\d+)$/' => 'Article/content?article_id=:1',
            '/^Cate\/[a-zA-Z-]*(\d+)$/' => 'Category/index?id=:1',
            '/^Cate\/[a-zA-Z-]*(\d+)-(\d+)-(\d+)$/' => 'Category/index?id=:1&str=:2&end=:3',
            '/^HappyNewYear\/(\d+)$/' => 'Help/HappyNewYear?user_id=:1',
            '/^Topic\/(\d+)$/' => 'Topic/index?topic_id=:1',
            '/^Cate\/(\w+)\/(\d+)$/' => 'Category/index?type=:1&id=:2',
            '/^Cate\/(\w+)\/(\w+)\/(\d+)$/' => 'Category/index?type=:1&order=:2&id=:3',
            '/^Seckill$/' => 'Seckill/index',
            '/^Seckill\/(\d+)$/' => 'Seckill/msDetails?id=:1',
            '/^Discount$/' => 'Seckill/discount',
            '/^Discount$\/(\d+)$/' => 'Seckill/msDetails?id=:1',
            '/^SignIn/' => 'Integral/index',
            '/^Integral$/' => 'Integral/goods',
            '/^Integral\/(\d+)$/' => 'Integral/details?id=:1',
            '/^Group$/' => 'Group/index',
            '/^Group\/(\d+)$/' => 'Group/details?id=:1',
        ),
    //模版后缀名为php
    'TMPL_TEMPLATE_SUFFIX' => '.php',
    'DEFAULT_FILTER' => 'strip_tags',
    // 模板相关配置
    'TMPL_PARSE_STRING' => array(
        '__PUBLIC__' => __ROOT__ . '/Public',
        '__JQ__' => __ROOT__ . '/Public/js/jquery-1.8.3.min.js',
        '__YZ__' => __ROOT__ . '/Public/js/Validform_v5.3.2_min.js',
        '__BJQ__' => __ROOT__ . '/Public/ueditor1_4_3/',
        '__LY__' => __ROOT__ . '/Public/layer/layer.js',
        '__IMG__' => __ROOT__ . '/Public/img',
        '__CSS__' => __ROOT__ . '/Public/css',
        '__JS__' => __ROOT__ . '/Public/js',
        '__MZUI__' => __ROOT__ . '/Public/assets',
    ),
    /* 数据库设置 */
    'DB_TYPE' => 'mysql', // 数据库类型
    'DB_HOST' => '127.0.0.1', // 服务器地址
    'DB_NAME' => 'b2b2c', // 数据库名
    'DB_USER' => 'root', // 用户名
    'DB_PWD' => 'root', // 密码
    'DB_PORT' => '3306', // 端口
    'DB_PREFIX' => 'tdd_', // 数据库表前缀
    'DB_PARAMS' => array(), // 数据库连接参数
    'DB_DEBUG' => TRUE, // 数据库调试模式 开启后可以记录SQL日志
    'DB_FIELDS_CACHE' => FALSE, // 启用字段缓存
    'DB_CHARSET' => 'utf8', // 数据库编码默认采用utf8
    'DB_DEPLOY_TYPE' => 0, // 数据库部署方式:0 集中式(单一服务器),1 分布式(主从服务器)
    'DB_RW_SEPARATE' => false, // 数据库读写是否分离 主从式有效
    'DB_MASTER_NUM' => 1, // 读写分离后 主服务器数量
    'DB_SLAVE_NO' => '', // 指定从服务器序号
    //URL配置
    'URL_CASE_INSENSITIVE' => FALSE, //不区分大小写
    //应用配置
    'DEFAULT_MODULE' => 'Home',
    'MODULE_DENY_LIST' => array('Common'),
    'MODULE_ALLOW_LIST' => array('Home', 'Admin', 'Stroe', 'Weixin', 'Mobile'),
    //开启调试模式
    'SHOW_PAGE_TRACE' => FALSE,
    //'URL_CASE_INSENSITIVE' => true, //不区分大小写
    'APP_SUB_DOMAIN_DEPLOY' => 1, // 开启子域名或者IP配置
    //'APP_DOMAIN_SUFFIX' => 'com.cn',
    'APP_SUB_DOMAIN_RULES' => array(
        'admin' => 'Admin',
        'store' => 'Store',
        'user' => 'User'
    ),
    
    //异常处理
    'ERROR_PAGE' =>'/Public/404.html',
/* 数据缓存设置 */
    'DATA_CACHE_TIME' => 0, // 数据缓存有效期 0表示永久缓存
    'DATA_CACHE_COMPRESS' => false, // 数据缓存是否压缩缓存
    'DATA_CACHE_CHECK' => false, // 数据缓存是否校验缓存
    'DATA_CACHE_PREFIX' => '', // 缓存前缀
    'DATA_CACHE_TYPE' => 'redis', // 数据缓存类型,支持:File|Db|Apc|Memcache|Shmop|Sqlite|Xcache|Apachenote|Eaccelerator
    'DATA_CACHE_PATH' => TEMP_PATH, // 缓存路径设置 (仅对File方式缓存有效)
    'DATA_CACHE_KEY' => '', // 缓存文件KEY (仅对File方式缓存有效)
    'DATA_CACHE_SUBDIR' => false, // 使用子目录缓存 (自动根据缓存标识的哈希创建子目录)
    'DATA_PATH_LEVEL' => 1,
    /* Redis设置 */
    'SESSION_TYPE' => 'Redis',
    'SESSION_PREFIX' => 'tdd_',
    'REDIS_HOST' => '127.0.0.1', //主机
    'REDIS_PORT' => '6379', //端口
    'REDIS_AUTH' => '',
    'REDIS_CTYPE' => 1, //连接类型 1:普通连接 2:长连接
    'REDIS_TIMEOUT' => 0, //连接超时时间(S) 0:永不超时 // 子目录缓存级别
);
